fix(ack-pay): preserve original error cause in verifyPaymentRequestToken#65
fix(ack-pay): preserve original error cause in verifyPaymentRequestToken#65ak68a wants to merge 2 commits intoagentcommercekit:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughUpdated error construction and propagation for payment request token verification: the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…tToken - Verify .cause is set when JWT verification fails (invalid format, expired, bad signature) - Verify .cause is undefined when schema validation fails (no caught error to wrap) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
InvalidPaymentRequestTokenErrorErrorOptionsPreviously, the catch block discarded the original error (expired token, bad signature, DID resolution failure), making it difficult to diagnose payment request verification failures. The original error is now available via
.cause.Test plan
InvalidPaymentRequestTokenErrorinstances🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests
AI Disclosure: This PR was developed with assistance from Claude Code (Claude Opus).